<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Test87s extends Model
{
    /**
     * @var string
     * 关联数据表
     * 添加一条数据的方法
     */
    protected $table = "article_test";
    public static function addOne($data){
        $user = new Test87s();
        return $user->table('article_test')->save($data);
    }

    /**
     * @param $where
     * @return \think\Paginator
     * 获取全部数据的方法
     */
    public static function getAll($where){
        return self::where($where)->paginate(['list_rows'=>3,'query'=>request()->param()]);
    }
}
